#include<iostream>
#include "polynomial.h"
#include "vector"
#include <cmath>  
using namespace std;

int main(){
    vector <double> x(7),y1(7), y2(7);
    x[0] = 0, x[1] = 6, x[2] = 10, x[3] = 13, x[4] = 17, x[5] = 20, x[6] = 28;
    y1[0] = 6.67, y1[1] = 17.3, y1[2] = 42.7, y1[3] = 37.3, y1[4] = 30.1, y1[5] = 29.3, y1[6] = 28.7;
    y2[0] = 6.67, y2[1] = 16.1, y2[2] = 18.9, y2[3] = 15.0, y2[4] = 10.6, y2[5] = 9.44, y2[6] = 8.89;
    Newton_Interpolation p1(x, y1);
    Polynomial P1 = p1.getPoly();
    Newton_Interpolation p2(x, y2);
    Polynomial P2 = p2.getPoly();
    cout << P1 << endl;
    cout << P2 << endl;
    cout << P1(43) << ' ' << P2(43) << endl;
}